cameo issueshttps://code.ill.fr/cameo/cameo/-/issues2020-10-01T14:57:35+02:00https://code.ill.fr/cameo/cameo/-/issues/10State handlers2020-10-01T14:57:35+02:00yannick legocState handlersIn This class, generalize the use of handlers: handleStop recorded as handler for a state change.
It would be also interesting to be able to register handlers on Instance. For example to listen to the termination of the instance.
That su...In This class, generalize the use of handlers: handleStop recorded as handler for a state change.
It would be also interesting to be able to register handlers on Instance. For example to listen to the termination of the instance.
That supposes to have callbacks.https://code.ill.fr/cameo/cameo/-/issues/11C++11 for the C++ API2020-10-13T14:52:19+02:00yannick legocC++11 for the C++ APIMigrate to C++11
* replace auto_ptr by unique_ptr
* use noncopyable
* C headers to be replaced: stdint.h, etc.Migrate to C++11
* replace auto_ptr by unique_ptr
* use noncopyable
* C headers to be replaced: stdint.h, etc.Python APIyannick legocyannick legochttps://code.ill.fr/cameo/cameo/-/issues/12Array transfer optimization2018-01-09T10:24:35+01:00yannick legocArray transfer optimizationOptimize by providing array optimization implementation by Xavier Pacalet.Optimize by providing array optimization implementation by Xavier Pacalet.https://code.ill.fr/cameo/cameo/-/issues/13Fixed publisher port2020-10-01T14:11:08+02:00yannick legocFixed publisher portIt can be interesting to fix the socket port for a publisher so that subscribers are still valid after the termination of the publisher e.g. after unintended crash.
Is it possible? How to ensure the port won't be used by a tier program?
...It can be interesting to fix the socket port for a publisher so that subscribers are still valid after the termination of the publisher e.g. after unintended crash.
Is it possible? How to ensure the port won't be used by a tier program?
We can add a flag:
```xml
<application ...>
<publisher name=""/>
```
Reserves fixed ports in case the application is single instance.https://code.ill.fr/cameo/cameo/-/issues/14toString format2022-04-22T09:21:36+02:00yannick legoctoString formatThe encoding of toString methods can be improved by using JSON.The encoding of toString methods can be improved by using JSON.JSON and nameshttps://code.ill.fr/cameo/cameo/-/issues/15Communication classes refactoring2020-10-01T14:13:30+02:00yannick legocCommunication classes refactoringPublisher and Subscribers can be implemented outside the static Application class (com package).
We have to extract the services from Application (and Impl) required to implement them as external (the idea is to have an example of how to...Publisher and Subscribers can be implemented outside the static Application class (com package).
We have to extract the services from Application (and Impl) required to implement them as external (the idea is to have an example of how to create a communication service).
So that the communication becomes extensible and other communication patterns can be implemented.
This requires to have access to the map of custom data in server.https://code.ill.fr/cameo/cameo/-/issues/16Deployment of a new version of a managed application2020-10-01T14:14:32+02:00yannick legocDeployment of a new version of a managed application* Solution
* new set of states for an Application that are independent from the current states: UP_TO_DATE, WAITING_FOR_UPDATE (version is waiting to be installed), UPDATING, ERROR (blocking the application?). We call it the update stat...* Solution
* new set of states for an Application that are independent from the current states: UP_TO_DATE, WAITING_FOR_UPDATE (version is waiting to be installed), UPDATING, ERROR (blocking the application?). We call it the update state.
* push a new version on a Cameo server. It is a request when processed:
* application becomes WAITING_FOR_UPDATE immediately
* the new version data is saved locally and replaces the previous new version if it is not installed yet
* the server installs it when the application is stopped (option: stop the application immediately)
* the application has the state UPDATING (new state in the current list)
* the config file is modified after each installation (to memorize the version number)
* the server shall not be brutally stopped
* enable to stop nicely the server
* default installation: copy file (jar) to install_directory, untar a tar to install_directory
* or an installation script
* command line: cmo app1 update app1.jar 1.2.3
* monitoring notifications:
* the Cameo server publishes a new status when the version is installed
* status VERSION value
* version in the application info
* class This can access versionhttps://code.ill.fr/cameo/cameo/-/issues/17Port strategy2020-10-21T10:29:11+02:00yannick legocPort strategyOnly the client API can check for a new available port because a tier program can reserve a port.
Solution:
- Add the server request PORT_UNAVAILABLE: the server stores the list of unavailable ports.
- The request REQUEST_PORT returns a...Only the client API can check for a new available port because a tier program can reserve a port.
Solution:
- Add the server request PORT_UNAVAILABLE: the server stores the list of unavailable ports.
- The request REQUEST_PORT returns a port available (not in the list of unavailable ports).
Use case:
1. The client requests a port.
2. The client tries to open the port. If successful, the procedure is finished.
3. If not successful, the client informs the server that the port is unavailable. Go to 1.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/18Display stream with multiple=yes2020-10-13T14:42:42+02:00yannick legocDisplay stream with multiple=yesImplement multiple stream for multiple applications:
- The cameo server accepts and starts a stream thread.
- The clients must filter the stream message on the application id.
For instance, the class OutputPrintThread.Implement multiple stream for multiple applications:
- The cameo server accepts and starts a stream thread.
- The clients must filter the stream message on the application id.
For instance, the class OutputPrintThread.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/19Refactor use of ZeroMQ2020-10-01T14:17:32+02:00yannick legocRefactor use of ZeroMQGather code: Socket calls.
Manage exceptions from ZeroMQ (ex: invalid host generates an exception).Gather code: Socket calls.
Manage exceptions from ZeroMQ (ex: invalid host generates an exception).https://code.ill.fr/cameo/cameo/-/issues/20Request version of the server in API2020-10-01T14:24:02+02:00yannick legocRequest version of the server in APICan be used later to check the compatibility.
Console application must be updated to provide a version command that will return a simple value in case the request does not exist.Can be used later to check the compatibility.
Console application must be updated to provide a version command that will return a simple value in case the request does not exist.https://code.ill.fr/cameo/cameo/-/issues/21Test outputStreamSocket null2020-10-01T15:12:26+02:00yannick legocTest outputStreamSocket nullCan occur when connecting to application and it dies before.Can occur when connecting to application and it dies before.https://code.ill.fr/cameo/cameo/-/issues/22When application stops immediately and starting_time = 02020-10-01T16:19:41+02:00yannick legocWhen application stops immediately and starting_time = 0There is no output and the console blocks in exec mode.There is no output and the console blocks in exec mode.https://code.ill.fr/cameo/cameo/-/issues/23Documentation2020-10-06T14:53:56+02:00yannick legocDocumentationThe documentation with concepts and commented examples must be written
Explain:
* What is an application
* What is an App = application instance
Draw the general case: multiple App instance -> multiple instance process -> application
*...The documentation with concepts and commented examples must be written
Explain:
* What is an application
* What is an App = application instance
Draw the general case: multiple App instance -> multiple instance process -> application
* Configuration file with options
* Managed and unmanaged applications
* Communication patterns
It will also contain:
* Publisher/Subscriber: dead publisher application. Clarify: Subscriber.hasEnded() returns false
* Study how the project is related to others: for documentation/article
* Asynchronous API, future/promise model, how it is not enough.
* Study Erlang
https://en.wikipedia.org/wiki/Erlang_(programming_language)
* thread safety: clarifyMischttps://code.ill.fr/cameo/cameo/-/issues/24Check null values passed to send data functions/methods2020-10-01T14:20:25+02:00yannick legocCheck null values passed to send data functions/methodsFor functions: This.setResult, Publisher.send, Requester.send.
The simplest solution is to do nothing if data are null.For functions: This.setResult, Publisher.send, Requester.send.
The simplest solution is to do nothing if data are null.Mischttps://code.ill.fr/cameo/cameo/-/issues/25Benchmark Android2020-10-01T14:25:10+02:00yannick legocBenchmark AndroidThe first tests with Cameo (JeroMQ and JZMQ) show bad performance in requester/responder (time mainly lost in the recv method). The benchmark will:
* Compare basic java Socket with JeroMQ, JZMQ sockets
* Test on different message sizesThe first tests with Cameo (JeroMQ and JZMQ) show bad performance in requester/responder (time mainly lost in the recv method). The benchmark will:
* Compare basic java Socket with JeroMQ, JZMQ sockets
* Test on different message sizeshttps://code.ill.fr/cameo/cameo/-/issues/26Define more than one Requester on the same Responder in one instance2017-09-01T10:41:38+02:00yannick legocDefine more than one Requester on the same Responder in one instanceThe Cameo API is limited to the definition of a single Requester for a given Responder.
We can modify the API to enable to have multiple requesters:
RequesterImpl.getRequesterPortName() must have another implementation:
return REQUESTER...The Cameo API is limited to the definition of a single Requester for a given Responder.
We can modify the API to enable to have multiple requesters:
RequesterImpl.getRequesterPortName() must have another implementation:
return REQUESTER_PREFIX + name + "." + responderId + "." + requesterCounter;
With requesterCounter a static integer incremented by concurrent access.
To be implemented in Java and C++.https://code.ill.fr/cameo/cameo/-/issues/27Keep app in the list with state UNKNOWN2020-10-01T14:26:03+02:00yannick legocKeep app in the list with state UNKNOWNWe keep the app with state UNKNOWN if it is still alive but has not a running state.
For instance, when an app is terminating but the process is still alive.We keep the app with state UNKNOWN if it is still alive but has not a running state.
For instance, when an app is terminating but the process is still alive.https://code.ill.fr/cameo/cameo/-/issues/28Messages.proto to move into cameo-commons2018-07-13T08:38:50+02:00yannick legocMessages.proto to move into cameo-commonsTo avoid class duplication in Java. Then cameo-commons becomes a Java project that depends cameo-server and cameo-java-api.To avoid class duplication in Java. Then cameo-commons becomes a Java project that depends cameo-server and cameo-java-api.https://code.ill.fr/cameo/cameo/-/issues/29States in objects2020-10-01T14:27:54+02:00yannick legocStates in objectsEach connected object must have a clear state.Each connected object must have a clear state.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/4Migration to Java 9: unify managed and unmanaged applications2021-04-22T13:01:01+02:00yannick legocMigration to Java 9: unify managed and unmanaged applicationsCurrently the Java 8 API does not allow to control the execution of a Process that is not started by the parent JVM. The Java 9 API will solve this by adding:
* Concept of *ProcessHandle* that can be accessed for all running processes u...Currently the Java 8 API does not allow to control the execution of a Process that is not started by the parent JVM. The Java 9 API will solve this by adding:
* Concept of *ProcessHandle* that can be accessed for all running processes using the *allProcesses* method.
* Process ID accessible for any process on any platform.
The documentation can be read here: [Java 9 Process API](https://aboullaite.me/java-9-process-api-got-a-new-boost/).
Before migrating, we will have to check that Android supports Java 9.
Notice that currently there can be strange behaviours. For example when starting an application as unmanaged, it is possible to connect to it in a different program but trying to kill and wait for its termination will block.https://code.ill.fr/cameo/cameo/-/issues/3Object lifecycle management: terminate()2022-01-18T15:40:19+01:00yannick legocObject lifecycle management: terminate()The example of a use of Cameo in a real project [nomad-client-cpp](https://code.ill.fr/instrument-control-protos/nomad-client-cpp) shows that the lifecycle of objects can be improved.
The Python API binding should require this too.
The...The example of a use of Cameo in a real project [nomad-client-cpp](https://code.ill.fr/instrument-control-protos/nomad-client-cpp) shows that the lifecycle of objects can be improved.
The Python API binding should require this too.
The objects associated to the context of server, e.g subscriber must be destroyed before server. That is realised by forcing This::terminate() because the shared pointer of subscriber is attached to the internal stop handler.
Is it possible to simplify and avoid this call?
A solution is to call terminate() on all objects.Mischttps://code.ill.fr/cameo/cameo/-/issues/30Android and Java 92020-10-01T14:32:33+02:00yannick legocAndroid and Java 9See what we need to do: keep old version in Android tablet app? or special code.See what we need to do: keep old version in Android tablet app? or special code.https://code.ill.fr/cameo/cameo/-/issues/31Create a single project for server, Java api, Java tests2018-11-28T08:49:15+01:00yannick legocCreate a single project for server, Java api, Java testsThe size of the project enables to have only one project that will be easier to maintain.
But how to do it with jeromq and jzmq?The size of the project enables to have only one project that will be easier to maintain.
But how to do it with jeromq and jzmq?https://code.ill.fr/cameo/cameo/-/issues/32Create a single project for the C++ api and the tests.2018-11-28T08:50:16+01:00yannick legocCreate a single project for the C++ api and the tests.https://code.ill.fr/cameo/cameo/-/issues/33Log messages in cameo.log : level in config2020-10-06T14:20:53+02:00yannick legocLog messages in cameo.log : level in configThe level displayed must be set by its value and not debug="ON" i.e log="FINE"The level displayed must be set by its value and not debug="ON" i.e log="FINE"Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/34Console output stream sync2020-10-14T15:48:47+02:00yannick legocConsole output stream syncUsed in console, the output stream can block.
It seems to come from the fact that the subscriber has not yet subscribed.
Solution: use a sync socket to check it is really.
That means that we must define a new request SYNC_STREAM like SYN...Used in console, the output stream can block.
It seems to come from the fact that the subscriber has not yet subscribed.
Solution: use a sync socket to check it is really.
That means that we must define a new request SYNC_STREAM like SYNC.
The server sends a SYNC_STREAM message on the concerned output stream.Mischttps://code.ill.fr/cameo/cameo/-/issues/35Implement blocking and non blocking responder2020-10-01T14:42:32+02:00yannick legocImplement blocking and non blocking responderCurrent implementation of the responder is non blocking.Current implementation of the responder is non blocking.https://code.ill.fr/cameo/cameo/-/issues/36Optimise the opening and closing of sockets : redesign communication between ...2020-10-01T14:53:05+02:00yannick legocOptimise the opening and closing of sockets : redesign communication between appsTo optimise the sockets, it is better to define 1 socket REP per app so that only simple messages are sent.
Do not block, the REP answers immediately as Acknowledge.
It is simpler to implement the timeouts.
The publisher and subscriber u...To optimise the sockets, it is better to define 1 socket REP per app so that only simple messages are sent.
Do not block, the REP answers immediately as Acknowledge.
It is simpler to implement the timeouts.
The publisher and subscriber use this common message queue.
A complete redesign is required.
All sockets must have a lifetime greater than a simple request: sockets connected to server also live the time of the process.https://code.ill.fr/cameo/cameo/-/issues/37Maven modules and a single project for all the projects2018-11-29T11:22:49+01:00yannick legocMaven modules and a single project for all the projectsInclude c++ into project: create directory cpp-api (next to Java modules).Include c++ into project: create directory cpp-api (next to Java modules).https://code.ill.fr/cameo/cameo/-/issues/38Add the method This.init(string, string)2020-11-02T15:19:20+01:00yannick legocAdd the method This.init(string, string)In case of unmanaged application, it is better to have a new method:
* This.init(String applicationName, String endpoint)In case of unmanaged application, it is better to have a new method:
* This.init(String applicationName, String endpoint)New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/39Output stream incomplete when process is crashing2020-10-01T14:44:00+02:00yannick legocOutput stream incomplete when process is crashingWhen a process is crashing e.g. nomad server at init, the output is not complete. Check if this is related to Java streams and cannot be improved in cameo server.When a process is crashing e.g. nomad server at init, the output is not complete. Check if this is related to Java streams and cannot be improved in cameo server.https://code.ill.fr/cameo/cameo/-/issues/40Stopping time and stop handler2020-11-02T18:31:10+01:00yannick legocStopping time and stop handlerThe stopping time meaning has been reviewed: it is used only when a stop handler is defined (by handleStop() or executable). It can be overriden with handleStop().The stopping time meaning has been reviewed: it is used only when a stop handler is defined (by handleStop() or executable). It can be overriden with handleStop().Mischttps://code.ill.fr/cameo/cameo/-/issues/41Check waitForStop() execution2020-10-01T14:45:12+02:00yannick legocCheck waitForStop() executionWhat happens if waitForStop occurs between hasToBeKilled and other subsequent calls?What happens if waitForStop occurs between hasToBeKilled and other subsequent calls?Mischttps://code.ill.fr/cameo/cameo/-/issues/43Quit console without killing the application in exec2020-10-09T08:52:56+02:00yannick legocQuit console without killing the application in execConsole updatehttps://code.ill.fr/cameo/cameo/-/issues/44Gather name and id to unify syntax in console2020-10-01T14:52:06+02:00yannick legocGather name and id to unify syntax in consoleAllow
```
$ cmo stop ns.1
```Allow
```
$ cmo stop ns.1
```https://code.ill.fr/cameo/cameo/-/issues/45Server version request2020-10-04T20:55:29+02:00yannick legocServer version requestAdd the function in APIs.Add the function in APIs.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/46Ban delete and use unique_ptr instead2019-11-27T09:23:02+01:00yannick legocBan delete and use unique_ptr insteadhttps://code.ill.fr/cameo/cameo/-/issues/47String output of requester2020-10-01T14:52:30+02:00yannick legocString output of requesterThe output should show the remote responder in @endpoint.The output should show the remote responder in @endpoint.https://code.ill.fr/cameo/cameo/-/issues/48Add the default constructor to Server class2022-04-20T13:47:11+02:00yannick legocAdd the default constructor to Server classWith Application::getEndpoint() as endpoint.With Application::getEndpoint() as endpoint.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/49Add the function This::init(string, string) in C++2020-10-01T14:52:57+02:00yannick legocAdd the function This::init(string, string) in C++In case of unmanaged application, it is better to have the function This::init(const std::string& endpoint, const std::string& applicationName).In case of unmanaged application, it is better to have the function This::init(const std::string& endpoint, const std::string& applicationName).https://code.ill.fr/cameo/cameo/-/issues/50Review the unique_ptr usage in C++ API2020-01-22T10:24:56+01:00yannick legocReview the unique_ptr usage in C++ APIHow objects are moved.How objects are moved.https://code.ill.fr/cameo/cameo/-/issues/51API improvements2020-10-01T14:54:35+02:00yannick legocAPI improvementsFollowing suggestions:
- Add getState in Instance.
- Add asynchronous callbacks for the states (C++ Instance must receive the states in a thread)Following suggestions:
- Add getState in Instance.
- Add asynchronous callbacks for the states (C++ Instance must receive the states in a thread)https://code.ill.fr/cameo/cameo/-/issues/52Avoid crash in connectToStarter2022-04-20T13:45:11+02:00yannick legocAvoid crash in connectToStarterIf the starter application is not accessible (hostname not resolvable), the C++ API is crashing.
Verify how it behaves in Java.
To test, change host="..." in the cameo config file of the starter application.If the starter application is not accessible (hostname not resolvable), the C++ API is crashing.
Verify how it behaves in Java.
To test, change host="..." in the cameo config file of the starter application.Mischttps://code.ill.fr/cameo/cameo/-/issues/53Review getActualState()2020-10-10T10:24:25+02:00yannick legocReview getActualState()It seems that sometimes the function Instance::now() does not return the current state. It happens with NomadGUI.
Does it come from the zeromq pub/sub? Some events could be lost?
If it is the case, one solution would be to poll at a low ...It seems that sometimes the function Instance::now() does not return the current state. It happens with NomadGUI.
Does it come from the zeromq pub/sub? Some events could be lost?
If it is the case, one solution would be to poll at a low frequency.
Test: start and kill an application. Follow it using now() in parallel. The workflow should never block.Mischttps://code.ill.fr/cameo/cameo/-/issues/55Switch to cmake for C++2020-10-07T11:23:08+02:00yannick legocSwitch to cmake for C++Python APIShervin NourbakhshShervin Nourbakhshhttps://code.ill.fr/cameo/cameo/-/issues/2Timeouts2022-10-19T14:14:50+02:00yannick legocTimeoutsEvery blocking call must be able to return after a timeout.
For a blocking call like waitFor, periodical tests should be provided.
Zeromq reliability: http://zguide.zeromq.org/php:chapter4
Failure example: remote app starts but a netwo...Every blocking call must be able to return after a timeout.
For a blocking call like waitFor, periodical tests should be provided.
Zeromq reliability: http://zguide.zeromq.org/php:chapter4
Failure example: remote app starts but a network failure happens before the setResult.
The change of state is ok but not the starter which blocks on getResult in the recv call.
Server initialization must throw a ConnectionTimeout or return boolean in case of timeout.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/1Blocking calls: cancel2023-07-25T08:32:28+02:00yannick legocBlocking calls: cancelThe C++ and Java API provide blocking calls:
* Publisher.waitForSubscribers
* Subscriber.receive
* Requester.request
* Responder.receive
* Instance.waitFor
The current implementation of cancel - e.g. called from a stop handler does not ...The C++ and Java API provide blocking calls:
* Publisher.waitForSubscribers
* Subscriber.receive
* Requester.request
* Responder.receive
* Instance.waitFor
The current implementation of cancel - e.g. called from a stop handler does not work well. It supposes the objects are waiting in a previous call.
An improvement must be done:
* Each object has the state waiting: true/false
* Each object has the state canceled: true/false
The canceled state is terminal: once an object is canceled it cannot revert to uncanceled.
These states must be managed properly by the associated waiting object.
* A common mutex blocks the access of the two states
* waiting false then canceled true: does not send the cancel "signal"
* waiting true then canceled true: sends the cancel "signal"
* canceled true then waiting true: does not send the cancel "signal" but the call returns immediately
We can add the create calls for the different objects except Instance. How to manage?New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/9Create a peer to peer network of Cameo servers2017-04-10T14:45:40+02:00yannick legocCreate a peer to peer network of Cameo serversWith the existence of Cameo servers running on different computers, it becomes easy to create a peer to peer network of Cameo servers.
The first thing is to create the links between Cameo servers. It will be done in the configuration ...With the existence of Cameo servers running on different computers, it becomes easy to create a peer to peer network of Cameo servers.
The first thing is to create the links between Cameo servers. It will be done in the configuration file or programmatically for a more dynamic way.
The link is twoway so that when a server attaches another one, both become available for the other one.
A simple API update can provides interesting features:
+ Server.getLinkedServerList(): ServerList
ServerList:
+ start(...): same interface than Server (add a special interface for common Server and ServerList?)
+ connect(...): same interface than Server
+ ...
+ iterator(): ServersIterator.
The ServersIterator class provides a dynamic iteration from the closest to the furthest (for node distance).
Load balancing is not implemented in the API: a simple start can be used: if it fails then try another server. The failure can happen if the application can only run once and is already running. Generalize the attribute multiple to have a maximum fixed number of instances?
Provide a load factor or simply let the client code do it?
Features must be simple. Complexity shoud be implemented in the client code. https://code.ill.fr/cameo/cameo/-/issues/8Implement the Python client API2021-03-25T11:19:48+01:00yannick legocImplement the Python client APILots of scientific users program with Python. Provide a client API can help the integration of the Python scientific software.
- [ ] update w.r.t. most up to date version of the C++ APILots of scientific users program with Python. Provide a client API can help the integration of the Python scientific software.
- [ ] update w.r.t. most up to date version of the C++ APIPython APIShervin NourbakhshShervin Nourbakhsh2020-10-09https://code.ill.fr/cameo/cameo/-/issues/7Linked apps2023-11-03T10:45:42+01:00yannick legocLinked appsAdd the option *LINKED* to start() to the client APIs.
This implies:
- When the app is terminated, the stop request is sent to each linked app (not kill).
A new function is added to the API: connectLinkedApps() : list of Instance
So th...Add the option *LINKED* to start() to the client APIs.
This implies:
- When the app is terminated, the stop request is sent to each linked app (not kill).
A new function is added to the API: connectLinkedApps() : list of Instance
So that a special stop can be made on the linked apps with the stop handler.
The link mechanism can be implemented:
- App sa: the starter
- App la: the linked app
- Server of the starter: ss
- Server of the linked app: ls
Solution:
- The linked attribute is passed to ls.
- An event thread listening to ls is started in ss if it is not already started.
- The event thread must be synchronized.
- When ls receives notification of a terminal state for sa, then la is stopped.
- The event thread has a timeout: when there is no activity on a linked app, the thread terminates.Server v1 update (2)https://code.ill.fr/cameo/cameo/-/issues/6Add user rendezvous to the list of status2022-04-20T13:47:48+02:00yannick legocAdd user rendezvous to the list of statusGeneralize the status (RUNNING, STOPPING, etc.) by adding user status to be used as rendezvous between two applications. The client APIs must provide a customizable setState(string) function/method.Generalize the status (RUNNING, STOPPING, etc.) by adding user status to be used as rendezvous between two applications. The client APIs must provide a customizable setState(string) function/method.https://code.ill.fr/cameo/cameo/-/issues/5Add/remove applications to the server with the client API2020-10-01T13:19:06+02:00yannick legocAdd/remove applications to the server with the client APIAdd functions/methods to the client API to update the server configuration.Add functions/methods to the client API to update the server configuration.https://code.ill.fr/cameo/cameo/-/issues/56Refactor OuputStreamSocket2022-04-20T13:42:52+02:00yannick legocRefactor OuputStreamSocketChange namespace/package. Return null instead of end in case of end.Change namespace/package. Return null instead of end in case of end.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/57Add the possibility to send text and binary content2020-10-01T14:56:30+02:00yannick legocAdd the possibility to send text and binary contentFor all the send/reply functions/methods.
Or unify with only binary and an interpreter to convert easily a text part.For all the send/reply functions/methods.
Or unify with only binary and an interpreter to convert easily a text part.https://code.ill.fr/cameo/cameo/-/issues/58Argument empty string passed to application2020-10-20T10:05:13+02:00yannick legocArgument empty string passed to applicationIn some cases, cameo server seems to pass an empty string in a argument.
Seen with AutoConfig.py.
The problem seems to occur when args="" in the configuration file.In some cases, cameo server seems to pass an empty string in a argument.
Seen with AutoConfig.py.
The problem seems to occur when args="" in the configuration file.Bugs to be checkedhttps://code.ill.fr/cameo/cameo/-/issues/59Correct ApplicationConfig.toString in cameo-server2020-10-01T14:58:30+02:00yannick legocCorrect ApplicationConfig.toString in cameo-servererrorComand must be correctederrorComand must be correctedhttps://code.ill.fr/cameo/cameo/-/issues/60Add a sync mode to subscriber2023-09-22T09:12:22+02:00yannick legocAdd a sync mode to subscriberThe subscriber does not know when it is really connected. We need to add an option at the creation of the subscriber.
However this implies to review the publisher which must have a thread running the responder.The subscriber does not know when it is really connected. We need to add an option at the creation of the subscriber.
However this implies to review the publisher which must have a thread running the responder.Mischttps://code.ill.fr/cameo/cameo/-/issues/61Review unique_ptr vs shared_ptr2020-10-01T15:00:36+02:00yannick legocReview unique_ptr vs shared_ptrRequest::getServer() should return a shared_ptr because it can be called many times.Request::getServer() should return a shared_ptr because it can be called many times.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/62Request::getServer to be reviewed2022-03-01T15:44:23+01:00yannick legocRequest::getServer to be reviewedProvide a way to create the server outside? And do not keep it inside the Request.Provide a way to create the server outside? And do not keep it inside the Request.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/63Thread-safety to be checked2020-02-14T08:27:26+01:00yannick legocThread-safety to be checkedCheck the classes: Server, etc. See if they can be thread-safe: unique_ptr is used to limit the risk of using in parallel.Check the classes: Server, etc. See if they can be thread-safe: unique_ptr is used to limit the risk of using in parallel.https://code.ill.fr/cameo/cameo/-/issues/65Console improvements2020-10-06T10:19:17+02:00yannick legocConsole improvements- Print server version
- Print endpoint
- Arguments:
-e host:port (no tcp://)
-p 10000 (only port to localhost)
Provide length args: -e = --endpoint, -p = --port, -a = --app- Print server version
- Print endpoint
- Arguments:
-e host:port (no tcp://)
-p 10000 (only port to localhost)
Provide length args: -e = --endpoint, -p = --port, -a = --appConsole updatehttps://code.ill.fr/cameo/cameo/-/issues/66Config file in JSON2020-10-09T15:24:05+02:00yannick legocConfig file in JSONSo that there is only JSON in the project: is more trendySo that there is only JSON in the project: is more trendyJSON and nameshttps://code.ill.fr/cameo/cameo/-/issues/67Arguments problem2020-10-01T12:11:57+02:00yannick legocArguments problemSee python application: one argument is emptySee python application: one argument is emptyhttps://code.ill.fr/cameo/cameo/-/issues/68Check compatibility2022-05-19T14:59:05+02:00yannick legocCheck compatibilityWhen connecting to a remote cameo server, it is necessary to check the version so that it is compatible with the API version.
The server must verify that the request is acceptable or not (i.e. a request from API v1 is not compatible with...When connecting to a remote cameo server, it is necessary to check the version so that it is compatible with the API version.
The server must verify that the request is acceptable or not (i.e. a request from API v1 is not compatible with v2).New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/69Server application storage2020-10-09T09:12:30+02:00yannick legocServer application storageProvide requests to save string data for each application.
The goal is to provide a general way to implement communication patterns.Provide requests to save string data for each application.
The goal is to provide a general way to implement communication patterns.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/70Switch Java Request/Responder/Publisher/Subscriber to application storage2022-03-01T15:46:13+01:00yannick legocSwitch Java Request/Responder/Publisher/Subscriber to application storageJava API code reviewhttps://code.ill.fr/cameo/cameo/-/issues/71Java API impl2022-03-01T15:45:12+01:00yannick legocJava API implReview the implementation classes.
How to manage dependencies:
Request.connectToRequester
depends on InstanceReview the implementation classes.
How to manage dependencies:
Request.connectToRequester
depends on InstanceJava API code reviewhttps://code.ill.fr/cameo/cameo/-/issues/72Review LifecycleApplicationThread2020-10-01T21:54:35+02:00yannick legocReview LifecycleApplicationThreadDefine clearly the state graph with all the concepts:
- starting time
- etc.
The error state should only happen when the process returns an error code.Define clearly the state graph with all the concepts:
- starting time
- etc.
The error state should only happen when the process returns an error code.Mischttps://code.ill.fr/cameo/cameo/-/issues/73API Names refactoring2022-04-19T13:10:14+02:00yannick legocAPI Names refactoring- Class application.Instance will be renamed into App (aka Application process proxy).
- Use of nested classes for Output, Config, Info (in App): possible to bind nested class in Python?
- Add App.getConfig()
- Review the java packages t...- Class application.Instance will be renamed into App (aka Application process proxy).
- Use of nested classes for Output, Config, Info (in App): possible to bind nested class in Python?
- Add App.getConfig()
- Review the java packages to prepare the module definition.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/74Console commands improvements2020-10-07T15:11:21+02:00yannick legocConsole commands improvements* Replace listen by connect -m (--mute)
* Start and connect connect -s (starts if not running)
connect --start
* Exec without output exec -q
exec --quiet* Replace listen by connect -m (--mute)
* Start and connect connect -s (starts if not running)
connect --start
* Exec without output exec -q
exec --quietConsole updatehttps://code.ill.fr/cameo/cameo/-/issues/75Console error code with command exec or connect2020-10-12T09:54:07+02:00yannick legocConsole error code with command exec or connectWhen command is exec, return the process error code when the execution is not a success.
The cameo server must be modified as well as the APIs.
Modify sendStatus on cameo server: add exit_code that is optional and only there when there...When command is exec, return the process error code when the execution is not a success.
The cameo server must be modified as well as the APIs.
Modify sendStatus on cameo server: add exit_code that is optional and only there when there is an error.
Add Instance.getErrorCode()Console updatehttps://code.ill.fr/cameo/cameo/-/issues/76Add commands to console: state, past states2020-10-13T17:05:28+02:00yannick legocAdd commands to console: state, past statespast state returns a list with , separator.past state returns a list with , separator.Console updatehttps://code.ill.fr/cameo/cameo/-/issues/77Replace Instance.exists() by an exception2022-04-20T13:41:19+02:00yannick legocReplace Instance.exists() by an exceptionIndeed, it is important to unify behaviour between different classes/methods:
* connect(name) throws UndefinedApplicationException.
* start(name) throws UndefinedApplicationException.
Idea: any undefined resource throws an exception (ke...Indeed, it is important to unify behaviour between different classes/methods:
* connect(name) throws UndefinedApplicationException.
* start(name) throws UndefinedApplicationException.
Idea: any undefined resource throws an exception (key, app, etc.)
* start() return a non-null Instance.
* connect() may return a null Instance if nothing executes.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/78Remove deprecated ZMQ methods from C++ API2022-01-20T16:45:20+01:00Shervin NourbakhshRemove deprecated ZMQ methods from C++ APIWhen compiling, I got several warnings about deprecated declarations using zmq methods.
```
./cameo/src/impl/SubscriberImpl.cpp:210:36: warning: ‘bool zmq::detail::socket_base::recv(zmq::message_t*, int)’ is deprecated: from 4.3.1, use ...When compiling, I got several warnings about deprecated declarations using zmq methods.
```
./cameo/src/impl/SubscriberImpl.cpp:210:36: warning: ‘bool zmq::detail::socket_base::recv(zmq::message_t*, int)’ is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]
m_subscriber->recv(message.get());
^
In file included from /opt/panosc/cameo/src/impl/SocketWaitingImpl.h:23,
from /opt/panosc/cameo/src/impl/SubscriberImpl.h:20,
from /opt/panosc/cameo/src/impl/SubscriberImpl.cpp:17:
/usr/include/zmq.hpp:1267:10: note: declared here
bool recv(message_t *msg_, int flags_ = 0)
^~~~
```New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/79Windows compilation with CMake2020-10-09T07:43:13+02:00yannick legocWindows compilation with CMakeCMakehttps://code.ill.fr/cameo/cameo/-/issues/80Request names refactoring2020-10-09T10:53:27+02:00yannick legocRequest names refactoringServer v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/81Add options to connect() and start()2023-09-01T16:24:08+02:00yannick legocAdd options to connect() and start()Some options can be interesting:
- STOP : stop the application if executing
- KILL : kill the application if executing
- START : start the application if not executing (for connect)Some options can be interesting:
- STOP : stop the application if executing
- KILL : kill the application if executing
- START : start the application if not executing (for connect)New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/82Add connect(id)2022-04-20T13:39:33+02:00yannick legocAdd connect(id)New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/83Remove cerr2022-04-20T13:40:16+02:00yannick legocRemove cerrMischttps://code.ill.fr/cameo/cameo/-/issues/84Use of optional<>2021-12-16T15:52:19+01:00yannick legocUse of optional<>It is possible to use optional<> to simulate null values in C++.
This can help to avoid defining exceptions.
This can be the solution to undefined resources: key, app, exitCode, etc.It is possible to use optional<> to simulate null values in C++.
This can help to avoid defining exceptions.
This can be the solution to undefined resources: key, app, exitCode, etc.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/85Socket linger crash2020-10-10T10:48:38+02:00yannick legocSocket linger crash- Encountered on PN1
- Null pointer: timeout causes a reset (pointer becomes null) and then crash
Why is there no init after reset?
The O2 flag could be at the origin? No destructor called?
Tests on gamma36 without request->...- Encountered on PN1
- Null pointer: timeout causes a reset (pointer becomes null) and then crash
Why is there no init after reset?
The O2 flag could be at the origin? No destructor called?
Tests on gamma36 without request->connectToRequester() in DatabaseResponder: no problem (timeouts forced)
Some crashes happen by ConnectionTimeout in DatabaseResponder: ok, exception not caught.
Why then it does not happen when socket is null? Remove virtual ~
Try:
- Sleep at the end of Server() to see if the event thread has an influence.Bugs to be checkedhttps://code.ill.fr/cameo/cameo/-/issues/86Crash cameo-lss-auto-config2020-11-02T14:05:52+01:00yannick legocCrash cameo-lss-auto-configRandom crash in the definition of the responder when nomad and cameo-lss-auto-config are on the same cameo server.Random crash in the definition of the responder when nomad and cameo-lss-auto-config are on the same cameo server.Bugs to be checkedhttps://code.ill.fr/cameo/cameo/-/issues/87Review event thread in API2022-01-18T15:46:38+01:00yannick legocReview event thread in APIImplement callback on state?
How to do it properly? record on the server event thread?
Do we block the event thread? simplest way to do it.Implement callback on state?
How to do it properly? record on the server event thread?
Do we block the event thread? simplest way to do it.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/88Use delete on copy and assignment constructors2020-10-13T14:53:43+02:00yannick legocUse delete on copy and assignment constructorsTo provide more security on the classes.To provide more security on the classes.Mischttps://code.ill.fr/cameo/cameo/-/issues/89Define future C++ and Java API class names in Python API2021-03-25T11:18:46+01:00yannick legocDefine future C++ and Java API class names in Python APIAs Python API is not used yet, we can already define the future names, i.e. App instead of Instance.
We need to fix the names.As Python API is not used yet, we can already define the future names, i.e. App instead of Instance.
We need to fix the names.Python APIhttps://code.ill.fr/cameo/cameo/-/issues/90Improve list output in Console2020-10-14T07:54:55+02:00yannick legocImprove list output in ConsoleList command: how to display long names: display until the max length.
Apps: idem: display name until the max length. Add the args.List command: how to display long names: display until the max length.
Apps: idem: display name until the max length. Add the args.Console updatehttps://code.ill.fr/cameo/cameo/-/issues/91Storage events2020-10-15T16:31:20+02:00yannick legocStorage eventsIt is necessary to send events for storage requests, especially the store request.
Implement:
- Store key event
- Remove key eventIt is necessary to send events for storage requests, especially the store request.
Implement:
- Store key event
- Remove key eventServer v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/92Review server code2020-11-02T10:26:25+01:00yannick legocReview server codeReview all the server code:
- Format the code
- Document the methods
- Document the request processReview all the server code:
- Format the code
- Document the methods
- Document the request processServer v1 update (2)https://code.ill.fr/cameo/cameo/-/issues/93Port strategy applied to server ports2020-10-21T14:54:09+02:00yannick legocPort strategy applied to server portsThe cameo server opens some ports by itself.
We can apply the port strategy to them.The cameo server opens some ports by itself.
We can apply the port strategy to them.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/94Rename State UNKNOWN into NIL2022-04-22T09:20:50+02:00yannick legocRename State UNKNOWN into NILNew version of APIshttps://code.ill.fr/cameo/cameo/-/issues/95Review info string passed as arg2020-11-02T10:23:36+01:00yannick legocReview info string passed as argUnify the format of the app and the starter app:
```
<name>.id@<endpoint>
```
Or
```
<name>@<endpoint>
```
For unmanaged applications.
Define parse() to get the infos in the class Strings.Unify the format of the app and the starter app:
```
<name>.id@<endpoint>
```
Or
```
<name>@<endpoint>
```
For unmanaged applications.
Define parse() to get the infos in the class Strings.Server v1 update (1)https://code.ill.fr/cameo/cameo/-/issues/96Application inheritance in server2020-10-26T09:24:37+01:00yannick legocApplication inheritance in serverDo not inherit Application from ApplicationConfig. Pass the object in field.
Define ApplicationAndStarterIdentity at the creation of the object.Do not inherit Application from ApplicationConfig. Pass the object in field.
Define ApplicationAndStarterIdentity at the creation of the object.Server v1 update (2)https://code.ill.fr/cameo/cameo/-/issues/97Remove server instances from API2020-10-26T21:56:44+01:00yannick legocRemove server instances from APIThe server instances are not easy to manage and in fact not very important.
We can imagine that the server instances are a pool managed implicitly.
This would help to have only one server instance per server and solve the server inst...The server instances are not easy to manage and in fact not very important.
We can imagine that the server instances are a pool managed implicitly.
This would help to have only one server instance per server and solve the server instance problem for connectToRequester().
We could imagine:
```
App app(name, endpoint)
App app(id, endpoint)
app.start()
app.connect()
app.stop();
app.waitFor();
Apps apps(name, endpoint) => the set of App
apps.kill();
apps.waitFor();
for (App app in apps) { use of key values to discriminate }
```
Q: Is it still interesting to be able to wait for a non-terminal state? A state handler would be more convenient.
Q: However, what to do with a server that has no application instances anymore? Wait before terminating it (cf strategy for linked apps)New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/98Review attribute names in config2020-11-03T19:43:11+01:00yannick legocReview attribute names in configFor instance, pass_info may be replaced by arg_info or argument_info or identityFor instance, pass_info may be replaced by arg_info or argument_info or identityServer v1 update (2)https://code.ill.fr/cameo/cameo/-/issues/99Add equals operator for Endpoint class2020-11-05T13:39:47+01:00yannick legocAdd equals operator for Endpoint classMischttps://code.ill.fr/cameo/cameo/-/issues/100Unify behavior of connect2022-04-20T13:37:13+02:00yannick legocUnify behavior of connectJava socket returns a boolean that is false if the endpoint is not accessible.
Check if the C++ connect can do the same thing.Java socket returns a boolean that is false if the endpoint is not accessible.
Check if the C++ connect can do the same thing.New version of APIshttps://code.ill.fr/cameo/cameo/-/issues/101Bad error message in Console when endpoint is not accessible2022-04-19T13:09:37+02:00yannick legocBad error message in Console when endpoint is not accessibleExample:
```
$ cmo -e toto list
Cannot connect to server: tcp://toto:7000 is not a valid endpoint
fr.ill.ics.cameo.InvalidArgumentException: tcp://toto:7000 is not a valid endpoint
at fr.ill.ics.cameo.impl.ServerImpl.<init>(ServerImpl.j...Example:
```
$ cmo -e toto list
Cannot connect to server: tcp://toto:7000 is not a valid endpoint
fr.ill.ics.cameo.InvalidArgumentException: tcp://toto:7000 is not a valid endpoint
at fr.ill.ics.cameo.impl.ServerImpl.<init>(ServerImpl.java:99)
at fr.ill.ics.cameo.Server.<init>(Server.java:54)
at fr.ill.ics.cameo.console.Console.<init>(Console.java:245)
at fr.ill.ics.cameo.console.Console.main(Console.java:868)
```Console updatehttps://code.ill.fr/cameo/cameo/-/issues/102Review log level for requests2022-03-18T11:42:51+01:00yannick legocReview log level for requestsSet finerSet finerServer v1 update (2)https://code.ill.fr/cameo/cameo/-/issues/103Test creation of publisher already created2022-04-20T11:22:25+02:00yannick legocTest creation of publisher already createdBugs to be checked