I'd like to use this package as data backend to expose an api/website with data analysis
How parallelization is done in this package ? is it possible to control the resources consumed ?
Br
is it possible to control the resources consumed ?
You can set the POLARS_MAX_THREADS env var. This will be used to initiate the thread pools size on startup.
See all configurable env vars here: https://pola-rs.github.io/polars/polars/index.html#config-with-env-vars
How parallelization is done in this package ?
Can you be more specific? I can only say it depends...
Related
I'm using latest vue2 and latest vue2-storage.
I'd like to have a local storage and session storage at the same time.
The goal is: store app config into local storage, store tmp user data in session storage.
As far as I get, the plugin will initialize only one storage for the whole app and - beside enforcing options each time you need it - there's no way to use a second storage on demand.
I've checked the source code and done some manual test but it seems impossible to import the constructor class to initialize a second storage.
Disclaimer 1: bare local/sessionStorage is not enough.
Disclaimer 2: I'm pretty new to vue2.
Hi)) I have updated the package to version 6.0.0, which implements the ability to separately import the class and plugin. issues/49
Is it easier if you just use plain javascript ?
you can easily use localStorage.setItem("test", "value") and localStorage.getItem("test") , sessionStorage.setItem("test", "value") and sessionStorage.getItem("test")
I'm using the cloud balancing example as a reference to a very similar problem. My model requires a dynamic processes adding/delete. I cannot find this feature it in the example.
How do you suggest to dynamically add/delete processes? Do i have to create a new cloudBalance problem instance, and call the solver ? Or i can modify the existing cloudBalance instance ?
Thank you
-Sara
See AddProcessProblemFactChange in optaplanner-examples.
When trying to use Waterline standalone mode, I could not find the correct method to perform native queries. With Sails.JS the sendNativeQuery method is used which I could not find in the instances of the models. Does anyone know how I can perform these queries?
Thank you!
I have the same problem, i think it sail who set getDatastore() and sendNativeQuery() function on model and datastore.
Surely on this file: https://github.com/balderdashy/sails-hook-orm/blob/master/lib/build-registered-datastore-instance.js
and the function is defined here: https://github.com/balderdashy/sails-hook-orm/blob/master/lib/build-registered-datastore-instance.js
Im going to implement this in my code but if someone have a better idea or have already doing this i appreciate help :)
Sails enables you to access what called datastore.manager
Depending on the adapter, this might represent a connection pool, a single connection, or even just a reference to a pre-configured client library instance.
If you are using MongoDB for example, you can have a raw Mongo collection instance.
see here.
We are creating a online platform and exposing an Julia API via a embedded code-editor. The user can access the API and run some analysis on our web-app. I have a question related to controlling access to the API and objects.
The API right now contains a database handle and other objects that are exposed to the user and can be used to hack the internal system.
Below is the current architecture:
UserProgram.jl
function doanalysis()
data = getdata()
# some analysis on data
end
InternalProgram.jl
const client = MongoClient()
const collection = MongoCollection(client,"dbname","collectionName")
function getdata()
data = #some function to get data from collection
return data
end
#after parsing the user program
doanalysis()
To run the user analysis, we pass user program as a command-line argument (using ArgParse module) and run the internal program as follows
$ julia InternalProgram.jl --file Userprogram.jl
With this architecture, user potentially gets access to "client" and "collection" and can modify internal databases.
Is there a better way to solve this problem without exposing the objects?
I hope someone has an answer to this.
You will be exposing yourself to multiple types of vulnerabilities - as the general rule, executing user inputed code is a VERY BAD IDEA.
1/ like you said, you'll potentially allow users to execute random code against your database.
2/ your users will have access to all the power of Julia to do things on your server (download files they can later execute for example, access other servers and services on the server [MySQL, email, etc]). Depending on the level of access of the Julia process, think unauthorized access to your file system, installing key loggers, running spam servers, etc.
3/ will be able to use Julia packages and get you into a lot of trouble - like for example add/use the Requests.jl package and execute DoS attacks on other servers.
If you really want to go this way, I recommend that:
A/ set proper (minimal) permissions for the MongoDB user configured to be used in the app (ex: http://blog.mlab.com/2016/07/mongodb-tips-tricks-collection-level-access-control/)
B/ execute each user's code into a separate sandbox / container that only exposes the minimum necessary software
C/ have your containers running on a managed platform where tooling exists (firewalls) to monitor incoming and outgoing traffic (for example to block spam or DoS attacks)
In order to achieve B/ and C/ my recommendation is to use JuliaBox. I haven't used it myself, but seems to be exactly what you need: https://github.com/JuliaCloud/JuliaBox
Once you get that running, you can also use https://github.com/JuliaWeb/JuliaWebAPI.jl
Hi could you please let me know the session filter setting to be added in jprofiler to prevent tracing of jdk internal calls?
Internal calls in the java.* packages are not measured by JProfiler in any case, regardless of your filter settings.
If you define "inclusive" filters that define the profiled classes, then all other packages are not profiled.
Note that the first call from a profiled class into a non-profiled class is always shown in the call tree, it's just the further internal calls that are not measured.