celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-402: updates the usage of dfi in the api v3 proposal
Date Wed, 28 Jun 2017 06:45:41 GMT
Repository: celix
Updated Branches:
  refs/heads/develop b47a8f486 -> d1f0e1d33


CELIX-402: updates the usage of dfi in the api v3 proposal


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/d1f0e1d3
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/d1f0e1d3
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/d1f0e1d3

Branch: refs/heads/develop
Commit: d1f0e1d33312a32bc605eebf8704502529768e6f
Parents: b47a8f4
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Wed Jun 28 08:51:35 2017 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Wed Jun 28 08:51:35 2017 +0200

----------------------------------------------------------------------
 documents/roadmap/api_v3/celix/celix.h | 19 +++++++++++++++----
 documents/roadmap/api_v3/readme.md     | 12 ++++++++++++
 2 files changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d1f0e1d3/documents/roadmap/api_v3/celix/celix.h
----------------------------------------------------------------------
diff --git a/documents/roadmap/api_v3/celix/celix.h b/documents/roadmap/api_v3/celix/celix.h
index f22866b..583262e 100644
--- a/documents/roadmap/api_v3/celix/celix.h
+++ b/documents/roadmap/api_v3/celix/celix.h
@@ -458,8 +458,11 @@ celix_module* celix_bundle_module(const celix_bundle* bundle);
 //celix/module.h
 
 
-#include "dfi/interface.h" //NOTE dyn_intefaces renamed to dfi_interface
-#include "dfi/message.h" //NOTE dyn_message renamed to dfi_message
+//NOTE dyn_intefaces renamed to dfi_interface and extended with dfi_interface_isCompatible(provider,
consumer) function
+#include "dfi/interface.h"
+
+//NOTE dyn_message renamed to dfi_message and extended with dfi_message_isCompatible(provider,
consumer) function
+#include "dfi/message.h"
 
 /**
  * The module can be used to register/unregister services, create service trackers,
@@ -921,19 +924,27 @@ void celix_module_stopTrackerListener(celix_module* mod, uint64_t trackerListene
  */
 void* celix_module_sym(celix_module* mod, const char* symbol);
 
+#ifndef CELIX_USE_DFI
+#define CELIX_USE_DFI 1
+#endif
+
+#if CELIX_USE_DFI == 1
+
 /**
  * Returns the dfi_interface for the provided interface name or
  * NULL if there is no dfi_interface for the provided service name
  * (i.e. no descriptor for the service name in the module resources).
  */
-const dfi_interface* celix_module_dfiInterface(celix_module* mod, const char* serviceName);
+const dfi_interface* celix_module_dfiInterface(const celix_module* mod, const char* serviceName);
 
 /**
  * Returns the dfi_message for the provided message type or
  * NULL if there is no dfi_message for the provided message type
  * (i.e. no descriptor for the message type in the module resources).
  */
-const dfi_message* celix_module_dfiInterface(celix_module* mod, const char* messageType);
+const dfi_message* celix_module_dfiInterface(const celix_module* mod, const char* messageType);
+
+#endif
 
 /**
  * Returns a resource entry or NULL if the resource entry cannot be found.

http://git-wip-us.apache.org/repos/asf/celix/blob/d1f0e1d3/documents/roadmap/api_v3/readme.md
----------------------------------------------------------------------
diff --git a/documents/roadmap/api_v3/readme.md b/documents/roadmap/api_v3/readme.md
index e804666..4fef085 100644
--- a/documents/roadmap/api_v3/readme.md
+++ b/documents/roadmap/api_v3/readme.md
@@ -59,6 +59,18 @@ Also taking in to perspective, than in many cases if an error is returned
there
 the proposed API focus more on easy of use and lenient and silently accepting invalid input
(i.e. NULL pointers
 or invalid ids).
 
+### Integral API
+Again because the OSGi API has grown overtime, the API seems to be dispersed and not one
integral API.
+The proposed API tries to remedy that.
+
+### Runtime Type Introspection
+With OSGi for Java you have runtime type introspection (reflection) build-in the Java language,
for C
+(and most other native languages) this is not the case. As effect is not possible to infer
if services
+are compatible or to automagically make service remote / serialize types.
+The dynamic function interface library (dfi library) adds type introspection support, by
using the extender pattern combined with so called type/interface descriptor files.
+Although not ideal, this can be used to runtime check service compatibility and automagically
serialize types.
+If possible the dfi support will be optional and opt-out.
+
 ### Eat your own dog food
 A bit strange, but as a service oriented framework the OSGi specification for the core framework
specification does not provide framework services.
 The proposed API moves some of the API for detailed info to framework services.


Mime
View raw message