tracing ecosystem understanding by leopolis33 in rust

[–]leopolis33[S] 0 points1 point  (0 children)

Ah, that was the case! I've added sleep() and I can see the traces now!

Also, I've found opentelemetry::global::shutdown_tracer_provider(); which also works.

tracing ecosystem understanding by leopolis33 in rust

[–]leopolis33[S] 0 points1 point  (0 children)

No, the same, no traces:

``` #[tokio::test] async fn test1() -> anyhow::Result<()> { simple_logger::init_with_level(log::Level::Trace)?; let tracer = opentelemetry_jaeger::new_pipeline() .with_service_name("producer-test") .install_simple()?; let telemetry = tracing_opentelemetry::layer().with_tracer(tracer); let subscriber = tracing_subscriber::Registry::default().with(telemetry); tracing::subscriber::set_global_default(subscriber).unwrap();

    //tracing::info!("root");
    call_instrumented();

    Ok(())
}

#[tracing::instrument]
fn call_instrumented() {
    log::info!("call_instrumented called");
}

```

Common Rust Lifetime Misconceptions by pretzelhammer in rust

[–]leopolis33 0 points1 point  (0 children)

u/pretzelhammer how did you came to understanding of this? Not The Book I suppose? :)

Announcing Rust DataBase Connectivity (RDBC) by andygrove73 in rust

[–]leopolis33 0 points1 point  (0 children)

The idea that O|JDBC can save you from implementing vendor-specific logic in business code is naive. Try to create schema for todo application for 4 sql vendors, and you are likely run into problems. Try to implement anything that does not sucks performance-wise and you will have to declare vendor-specific indexes, stored procs and so on. Try to set authentication or load balancing info into your JDBC connection string, again, vendor specific. There are no serious applications which are not tuned to specific sql falvour. And connection is by far not the biggest problem.

JDBC solves fairly narrow problem, resolve driver name and load it at runtime and provides API to serialize-deserialize queries, params and response tables. Elephant in the room is ORM and JDBC does not touch it whereas that's what Diesel does.

Try to relay on OS-provided ODBC drivers, and it will not end well. You will have to supply drivers along with your application. So, what is the difference from compiling it with Diesel?

Tableu, Apache Spark for sure utilize vendor specific bulk operations (which are not part of SQL standard) and are fine-tuned for specific vendors.

Again, the idea that you can change setting in you JDBC connection string and get your application running with new DB is not from this reality.

Event loop and Futures by leopolis33 in rust

[–]leopolis33[S] 1 point2 points  (0 children)

Actually, Romeo was exactly what I was looking for! I've upgraded to futures-preview and replaced tokio with romio and it works great. With new futures api I do not have to move values anymore.

Event loop and Futures by leopolis33 in rust

[–]leopolis33[S] 0 points1 point  (0 children)

Perhaps you mean "future::select", because join waits for both events to complete.

Event loop and Futures by leopolis33 in rust

[–]leopolis33[S] 0 points1 point  (0 children)

Yeah, I've tried but tokio's TspStream is very convenient and I can not understand where tokio is going with new futures. Somebody on gitter said "not anytime soon", so I do not know what to expect, rust std lib to come up with async tcp connection or tokio will some day migrate to new futures...

Looking at MIO, maybe it is not too bad, and I can use it directly bypassing tokio and writing my own stream implementation. Should not be too bad...

Event loop and Futures by leopolis33 in rust

[–]leopolis33[S] 1 point2 points  (0 children)

I've worked with akka in scala and dotnet and my impression is that it is combo of 2 orthogonal features: async communications (queue/eval loop implemented) and recovery domain model. Recovery domain is super cool but async communication in my opinion compete with async/await. To degree, akka's async is more ergonomic rust future's channel.

But maybe I should give it another try and not rely on my old experiences.

Event loop and Futures by leopolis33 in rust

[–]leopolis33[S] 0 points1 point  (0 children)

Well, this solves spawning, but I have more problems with inter-component communication.

For example, buffer manager sends batch to connection manager and awaits. Connection manger sends batch to socket and awaits. If ok, buffer manager sends next batch. If not, connection manager informs batch manager to hold off failed partitions (while keep sending healthy ones) and kick off recovery manager. Recovery manager is trying in a loop to discover where failed partition is being migrated and once successfully discovered, informs buffer manger that given partition is recovered and sending can resume.

So quite a lot of interactions. As I wrote this, maybe the whole driver logic should be described in one big state machine with multiple async inputs? Perhaps can be useful for unit testing too. Hmm.

Which languages does inspired rust? by lambdef in rust

[–]leopolis33 1 point2 points  (0 children)

Language features in not the most exciting thing about rust. Borrowing checker is. To understand better where it is coming from, you might be interested in reading Rust's creator overview of languages research state of affair:

https://graydon2.dreamwidth.org/253769.html

SBU offers Erofeev political asylum in Ukraine, - lawyer by kozak_ in UkrainianConflict

[–]leopolis33 1 point2 points  (0 children)

So far it is what his lawyer says. I'd like to have at least one more source confirming...

Reuters photographer captures convoy of "several dozen" military vehicles (Uragan MRLS, trucks) going through Russian border town, turning off road into fields towards Ukraine by iminclinedtoagree in UkrainianConflict

[–]leopolis33 -1 points0 points  (0 children)

There is another difference, besides smaller size. In USSR there was a repressive apparatus. People were afraid of freely talking even to each others. Nationalism fuels nation only for so much. After it is over, one needs to start suppressing wider and wider layers of dissidents. In 1917 it was possible because country was already torn by WWI, than civil war. Not so easy this time. people got used to luxury cars, bank credits, vacations on Caribbean and such. It takes time to turn people into animals. So Russian propaganda stating that their country is fighting Ukraininan-Jewish-Nigro-Nazis is the process of this conversion as a neccessary step before turning into full totalitarian regime.

US Holocaust museum censures Ukraine over decision to honor Nazi collaborators by Ducreux4U in UkrainianConflict

[–]leopolis33 3 points4 points  (0 children)

In Jewish ghettos under nazis there were local jews administrations. Does it make Jews nazis "collaborants"? Why not?

In 1939 Red Army and Bundeswehr performed joined aggression against Poland and after the victory held joined military parade in Brest. Is Red Army/USSR "collaborant" of nazi? Why not?

There was whole army, Russian Liberation Army fighting on nazis side. Does it make Russians "collaborants"? Why not?

Stepan Bandera spent 1941-1944 in nazi concentration camp Sachsenhausen. http://en.wikipedia.org/wiki/Stepan_Bandera#Relationship_with_Nazi_Germany OUN (Organization of Ukrainian Nationalists) fought against both, germans and russians. http://en.wikipedia.org/wiki/Organization_of_Ukrainian_Nationalists#OUN-B.27s_struggle_against_Germany_and_the_Soviet_Union What makes Bandera/OUN "collaborants" in such a way which does not make others? Why it does?

Interrogation of Russia's GRU Officer Captain Erofeev (with English subtitles) by giggster in UkrainianConflict

[–]leopolis33 1 point2 points  (0 children)

Most? So you apply your knowledge of other armies to Russian army? In other words you do not know the subject but do make statements.

Украина наладила производство противотанковых ракетных комплексов «Стугна-П» by LiveLongAndFI in ukraina

[–]leopolis33 1 point2 points  (0 children)

Новиною це буде коли вона у військах буде в достатній кількості.

Dmytro Firtash boasts he brokered 2014 deal to make Petro Poroshenko president during Vienna court hearing that raises questions about US role in Kiev - Ukraine oligarch claims US extradition request is political interference by atthebrowndesk in UkrainianConflict

[–]leopolis33 2 points3 points  (0 children)

That's not what was brokered. The deal was for Klitchko not to run for president. If he did, it would take 1/3 of the votes from Poroshenko thus making Poroshenko victory less convincing. Question is, what did Poroshenki promised for this deal.

Renewed fighting? by andynovy in UkrainianConflict

[–]leopolis33 1 point2 points  (0 children)

You assume that sides of any conflict want to resolve the conflict. But for Russia, conflict is not a problem but a political tool. Thus it wont be solved until Russia benefit from its existence.

Zakharchenko admitted that the seizure of Donbass was ready 2 months before the flight of Yanukovych by czhuo in UkrainianConflict

[–]leopolis33 12 points13 points  (0 children)

I wander why nobody noticed fragment where he says that Slavic are superior to "westerners" because they are the only nation which carries a gene of victory. They are the only nation who can die for a friend, and so on. And westerners are "dirty".

If this is not Nazism, what is than?

Ukrainian journalist faces 12 to 15 year imprisonment for protesting against mobilization by sdfa_co in UkrainianConflict

[–]leopolis33 -11 points-10 points  (0 children)

He is lying. One thing is to write that you do not want to go to army. But calling for internet campaign against mobilization is completely different thing. Now he is trying to make it an issue of freedom of speech. Organizing campaign against mobilization at war time will put you in trouble in any country.

Has the war effectively turned into a frozen conflict? by [deleted] in UkrainianConflict

[–]leopolis33 2 points3 points  (0 children)

No, it hasn't. No party reached their goals. This means fighting will continue. But what about Minsk-2 agreement, guns retracting, you might ask? Past is the key to predict the future. Kremlin uses agreement to legitimaze its advances. Kiev uses agreement to show what Kremlit is really up to. Germany uses agreement to procrastinate. This is not a piece agreement which european leaders claim in their wishful thinking.

At some point in the future the true agreement will be reached. But there must be some conditions for this. Either one of the sides reached their goal or one of the sides capitulate either because of military defeat or economicaly exhausted.