Starcounter / Home

Starcounter is an in-memory database application engine.
https://starcounter.io
27 stars 1 forks source link

Deploy custom "public assembly" with App? #282

Closed johano99 closed 6 years ago

johano99 commented 6 years ago

When deploying apps to the warehouse, is there a way to mark any dependent assemblies to go into the Starcounters "Public Assemblies" (or similar) instead of ending up in the apps private folder?

Mackiovello commented 6 years ago

I don't think that's possible right now. What's your use case for it?

johano99 commented 6 years ago

Two apps wanting to share data & logic

ghost commented 6 years ago

Addition to what @Mackiovello said: The only dependency an app has in the warehouse is to witch Starcounter version its build against.

johano99 commented 6 years ago

Ok, I have built an app, OAuth2, for doing authentications towards Google, Facebook and Microsoft, and I put all common "oauth:ish-logic" into its own separate module, OAuth2.Core.dll.

Now I am building another app, CalendarSync, that needs to reference the same data model and functions defined in this OAuth2.Core.dll to make its calls into Google Calendar API / Microsoft Graph API.

Question is, how do I deploy this dependent assembly? Is it ok to deploy it together with all apps that references it? How would versioning then handled?

per-samuelsson commented 6 years ago

@johano99

I'm sorry I can't answer your question, but this is a real important one you bring up and I think we need to support it. If not "natively" (with support from warehousing), we need to at least provide a nice "how to".

My spontaneous thinking is packaging up the dependency in package, e.g. a NuGet package. And have both app depend on that. I'm not an expert on our packaging for warehouses, but I guess it would mean the same library would end up in both packages. And then comes your questions:

Is it ok to deploy it together with all apps that references it?

It is.

How would versioning then handled?

In the shared host, we compare versions. I think we match minor.major and do some redirect if they match (but build / patch etc dont), and refuse to load the last started app if not.

per-samuelsson commented 6 years ago

@andwah

I guess we only support apps in warehouses, not packaging of libraries / components, right?

joozek78 commented 6 years ago

Yes, warehouse stores apps that are already built. It doesn't care about the way you manage your dll dependencies. If I understand your case correctly, using Nuget should solve your problems

ghost commented 6 years ago

I guess we only support apps in warehouses, not packaging of libraries / components, right?

True. only apps packages is supported.

Mackiovello commented 6 years ago

I hope this answered your question @johano99.

Closing

johano99 commented 6 years ago

Yes, thank you!